import store from '@/store/index.js'
// 选择组件
export function activeComponent(res, index) {
	store.commit('$setCurWidgetId', res.id)
	store.commit('$setRightcom', res.style)
	store.commit('$setCurrentproperties', res.setStyle)
	store.commit('$setCurrentComponent', res)

}

export function deleteComponent(res, index) {
	res.splice(index, 1)
	store.commit('$setCurWidgetId', '')
	store.commit('$setRightcom', 'decorate')
}